home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Borland / Borland C++ V5.02 / TBEXPERT.PAK / DYNBTNGA.CPP < prev    next >
C/C++ Source or Header  |  1997-05-06  |  921b  |  38 lines

  1. //----------------------------------------------------------------------------
  2. // ObjectWindows
  3. // Copyright (c) 1995, 1995 by Borland International, All Rights Reserved
  4. //
  5. // Filename:    dynbtnga.cpp
  6. //
  7. // Date:        27-Sep-95
  8. //
  9. // Description:
  10. //----------------------------------------------------------------------------
  11. #include <owl/pch.h>
  12. #include "TBExpert.h"
  13.  
  14. TDynamicButtonGadget::TDynamicButtonGadget(const char* pathToDib,
  15.   int id, TType type, bool enabled, TState state, bool sharedGlyph)
  16. :
  17.   TButtonGadget(TResId(id), id, type, enabled, state, sharedGlyph)
  18. {
  19.   PathToDib = strnewdup(pathToDib);
  20. }
  21.  
  22.  
  23. TDynamicButtonGadget::~TDynamicButtonGadget()
  24. {
  25.   delete[] PathToDib;
  26. }
  27.  
  28.  
  29. TDib*
  30. TDynamicButtonGadget::GetGlyphDib()
  31. {
  32.   TDib* dib = new TDib(PathToDib);
  33.   dib->MapUIColors( TDib::MapFace | TDib::MapText | TDib::MapShadow |
  34.     TDib::MapHighlight );
  35.   return dib;
  36. }
  37.  
  38.